---
title: useFocusTrap
description: The useFocusTrap hook provides accessibility-focused keyboard navigation management, keeping focus trapped within modal components for better user experience.
lastModified: 2025-04-10
availableIn:
  - framework: 'next'
    url: '/docs/frameworks/next/hooks/use-focus-trap'
    title: 'Next.js'
  - framework: 'react'
    url: '/docs/frameworks/react/hooks/use-focus-trap'
    title: 'React'
---

<import>../../react/hooks/use-focus-trap.mdx</import>
